//
//  AddIosView.m
//  Runner
//
//  Created by 董亚强 on 2021/11/11.
//

#import "AddIosView.h"
#import "BaseMapView.h"
#import <MAMapKit/MAMapKit.h>
#import <AMapFoundationKit/AMapFoundationKit.h>

@interface AddIosView()
@property(nonatomic,strong) BaseMapView *mapView;

@end
@implementation AddIosView
 
- (void)setFrame:(CGRect)frame{
    [super setFrame:frame];
}
- (instancetype)initWithFrame:(CGRect)frame AndMsg:(id)msg{
    self = [super initWithFrame:frame];
    if(self){
        NSDictionary *dic = msg;
        self.mapView = [[BaseMapView alloc]initWithMsg:dic];
        [self addSubview:self.mapView];
        self.mapView.translatesAutoresizingMaskIntoConstraints = NO;
    }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.mapView.frame = self.bounds;
}

- (void)callMethod:(NSString *)method AndMsg:(id)msg result:(FlutterResult)result{
    if ([method hasPrefix:@"baiduMap"]) {
//        [self.mapView flutterMethod:method AndMsg:msg];
    }else if ([method isEqualToString:@"stop"]){
        
    }else {
        result(FlutterMethodNotImplemented);
    }
}
@end
